<?php
/**
 * Created by PhpStorm.
 * User: sks
 * Date: 2015/12/15
 * Time: 13:49
 */

/**
 * Class Involved_AdminModel
 */

class Involved_AdminModel extends BaseModel{

    protected $table = 'admin';


    /**
     * 管理员列表
     * @return mixed
     */
    public function ManageAdmin()
    {
        return  DB::table($this->table)->get();
    }

    public function GetAdminInfo($id)
    {
        return DB::table($this->table)->where('id',$id)->first();
    }

    public function getLoginAdminInfo($name,$pwd)
    {
         return DB::table($this->table)
             ->select('id','name','real_name','avatar','role_id','mobile')
             ->where(['name'=>$name,'password'=>$pwd])
             ->first();

    }





}